import React, { Component } from 'react';
import reactDOM from 'react-dom';
import './style.scss'

class Index extends Component {
	// static success (options) {
	// 	console.log(options);
	// }
	render() {
		const { message, type } = this.props
		return (
			<div type={ type } className="alert">
				<b className="close">X</b>
				<p className="content">
					{ message }
				</p>
			</div>
		);
	}
}

Index.success = function (options) {
	const el = document.createElement('div')
	document.body.appendChild(el)
	console.log(options);
	const vir = <Index type="success" message={ options.mess } />

	reactDOM.render(vir, el)
}
export default Index;

